package Cola;

import java.util.ArrayList;

/**
 * @Author Zhang Chao
 * @Date 2021/5/19 21:05
 * @Version 1.0
 * 写一个测试类TestCompany,在main方法，把若干各种类型的员工放在一个ColaEmployee 数组里，并单元出数组中每个员工当月的工资。
 */
public class TestCompany {

    public static void main(String[] args) {

//        ColaEmployee[]  colaEmployees = new ColaEmployee[10];

        //创建、初始化数组
        ColaEmployee[] cel = {
                new SalariedEmployee("salariedEmployee", 6, 30000),//name,month,月薪
                new HourlyEmployee("hourlyEmployee", 5, 100, 300),//name,month,时薪,小时数
                new SalesEmployee("salesEmployee", 3, 7000000, 0.3)//name,month,月销售额，提成率
        };
        //数组遍历
        for (int i = 0; i < cel.length; i++) {
            new Company().getSalary(cel[i],7);
        }

    }
}
